<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="style/default.css">
<title>Result</title>
</head>
<body>
	<div id="wrapper">
		<jsp:include page="menu.jsp"></jsp:include>
		<div id="content-block">
			<div id="content-wrapper">
				<h1>New Patient</h1>
				<div class="horizontal-line"></div>

				<form action="new" method="post">
					<fieldset>
					<legend>Personal informations</legend>
						<table id="new-patient-table">
							<tr>
								<td>
									<label for="firstName">
										First Name
									</label>
								</td>
								<td>
									<input name="firstName"
										id="firstName" type="text"
										value="<c:if test="${empty form.error['firstName']}">${patient.firstName}</c:if>"></td>
								<c:if
									test="${!empty form.error['firstName']}">
									<td>
										<span class="error formerror">
											${form.error['firstName']}
										</span>
									</td>
								</c:if>
							</tr>
							<tr>
								<td>
									<label for="lastName">
										Last Name
									</label>
								</td>
								<td>
									<input name="lastName" id="lastName"
										type="text"
										value="<c:if test="${empty form.error['lastName']}">${patient.lastName}</c:if>"></td>
								<c:if
									test="${!empty form.error['lastName']}">
									<td>
										<span class="error formerror">
											${form.error['lastName']}
										</span>
									</td>
								</c:if>
							</tr>
							<tr>
								<td>
									<label for="mail">Mail</label>
								</td>
								<td>
									<input name="mail" id="mail"
										type="text"
										value="<c:if test="${empty form.error['mail']}">${patient.mail}</c:if>"></td>
								<c:if
									test="${!empty form.error['mail']}">
									<td>
										<span class="error formerror">
											${form.error['mail']}
										</span>
									</td>
								</c:if>
							</tr>
							<tr>
								<td>
									<label for="phoneNumber">
										Phone Number
									</label>
								</td>
								<td>
									<input name="phoneNumber"
										id="phoneNumber" type="text"
										value="<c:if test="${empty form.error['phoneNumber']}">${patient.phoneNumber}</c:if>"></td>
								<c:if
									test="${!empty form.error['phoneNumber']}">
									<td>
										<span class="error formerror">
											${form.error['phoneNumber']}
										</span>
									</td>
								</c:if>
							</tr>
							<tr>
								<td></td>
								<td>
									<button class="send-button"
										type="submit">
										Send
									</button>
								</td>
							</tr>
						</table>
					</fieldset>
				</form>
			</div>
		</div>
	</div>
</body>
</html>
